package edu.ynu.se.xiecheng.achitectureclass.dao;

import edu.ynu.se.xiecheng.achitectureclass.common.dao.LogicDAO;
import edu.ynu.se.xiecheng.achitectureclass.entity.User;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserDao extends LogicDAO<User, Long> {
    
    @Query("SELECT u FROM User u WHERE u.isDeleted = 0 AND u.username = :username")
    User findByUsername(@Param("username") String username);
}
